package com.cq.hd.member.api;

import com.cq.hd.common.pagination.Page;
import com.cq.hd.common.response.Result;
import com.cq.hd.member.api.dto.EnterBusinessPageDto;
import com.cq.hd.member.api.dto.InviteBusinessUrlPageDto;
import com.cq.hd.member.api.dto.InviteBusinessUrlSaveDto;
import com.cq.hd.member.api.vo.EnterBusinessPageVo;
import com.cq.hd.member.api.vo.InviteBusinessUrlPageVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "hd-o2o-member-service", contextId = "invite-business-url-api")
public interface TbInviteBusinessUrlApi {

    // 添加
    @PostMapping("/member/inviteBusinessUrl/saveInviteBusinessUrl")
    Result<Object> saveInviteBusinessUrl(@RequestBody InviteBusinessUrlSaveDto inviteBusinessUrlSaveDto);

    // 列表
    @GetMapping("/member/inviteBusinessUrl/pageInviteBusinessUrl")
    Result<Page<InviteBusinessUrlPageVo>> pageInviteBusinessUrl(@SpringQueryMap InviteBusinessUrlPageDto inviteBusinessUrlPageDto);

    // 删除
    @DeleteMapping("/member/inviteBusinessUrl/deleteInviteBusinessUrl")
    Result<Object> deleteInviteBusinessUrl(@RequestParam("id") Long id);

    // 查看入驻商家
    @GetMapping("/member/inviteBusinessUrl/pageEnterBusiness")
    Result<Page<EnterBusinessPageVo>> pageEnterBusiness(@SpringQueryMap EnterBusinessPageDto enterBusinessPageDto);

    // 根据id获取商家邀请码数据
    @GetMapping("/member/inviteBusinessUrl/getById")
    Result<InviteBusinessUrlPageVo> getById(@RequestParam("id") Long id);
}
